home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / EDLIN.TEC < prev    next >
Text File  |  1992-03-09  |  10KB  |  235 lines

  1. ID:ED How to edit your DOS files.
  2. A Quarterdeck Technical Note #209
  3. by Bob Perry
  4.  
  5.      Our Technical Support Team has determined that a modification of your 
  6. computer's "boot-up" files is necessary to correct a conflict your system has 
  7. been experiencing. The two "boot-up" files used by DOS are the System 
  8. Configuration File, CONFIG.SYS, and the System Startup Batch File, 
  9. AUTOEXEC.BAT.  After the following preliminary questions have been answered, 
  10. you should be able to modify these two files following the prescription of our 
  11. technician.
  12.  
  13. Q: What are the CONFIG.SYS and AUTOEXEC.BAT files?
  14.  
  15.      Both the CONFIG.SYS and AUTOEXEC.BAT files are ASCII text files that DOS 
  16. processes when your system is turned on or restarted.  They are found in the 
  17. root directory of your boot drive. (For most DOS machines with a hard disk, 
  18. C:\ is the drive designation of the boot drive).  CONFIG.SYS allows you to 
  19. configure certain aspects of DOS, such as installing device drivers for memory 
  20. management.  AUTOEXEC.BAT is an optional batch file (although almost everyone 
  21. uses it) containing a series of DOS commands, which may include the 
  22. installation of TSR (Terminate and Stay Resident) utilities, or configuration 
  23. and enhancement features.
  24.  
  25. Q: What programs are used to modify the CONFIG.SYS or AUTOEXEC.BAT?
  26.  
  27.      There are three ways to modify a text file like your CONFIG.SYS and 
  28. AUTOEXEC.BAT files.
  29.      1-Use your word processor.
  30.      2-Use simple DOS commands.
  31.      3-Use the EDLIN program in DOS.
  32.  
  33.      Although it is probably much easier to use your own favorite word 
  34. processor, like WordPerfect or DESQview Notepad, to edit your system 
  35. configuration files, simple DOS commands like COPY, TYPE, and REN can be used.  
  36. Also, DOS contains a "line editor" known as EDLIN which can be used to create 
  37. and edit more elaborate text files.  EDLIN is a bit more cumbersome to use 
  38. than most word processing programs. Hence, it may be faster to learn how your 
  39. own word processor edits a DOS text file (also known as an ASCII file, or 
  40. Nondocument mode) than to use EDLIN. 
  41.  
  42. Q: How can simple DOS commands help modify my files?
  43.  
  44.      Another way to edit your CONFIG.SYS or AUTOEXEC.BAT file is to use simple 
  45. DOS commands. In this example we will assume it is necessary to make a change 
  46. to your CONFIG.SYS file. First, you should determine the location of the file. 
  47. It is usually found in the root directory of your hard disk.  To be certain it 
  48. is  present in the root, change directories to the root and type: 
  49.  
  50. C:\>DIR CONFIG.SYS (and hit Enter) 
  51. You should see a message displayed indicating the size, the date, and the time 
  52. your CONFIG.SYS file was created. like this:
  53.  
  54. C:\>DIR CONFIG.SYS
  55.  
  56.      Volume in drive C is (your label)
  57.      Directory of  C:\
  58.  
  59.     CONFIG   SYS      114  12-03-90  11:18a        1 File(s)  
  60.                     5746688 bytes free
  61.  
  62. C:\>
  63.  
  64. Next, just to be on the safe side, you should make a backup copy of your 
  65. CONFIG.SYS file. This is so that if you need to recall any of it's contents it 
  66. will still be available to you.  To do this, use the DOS REName command:
  67.  
  68. C:\>REN CONFIG.SYS CONFIG.OLD.  
  69.  
  70. This will rename your CONFIG.SYS file to CONFIG.OLD.  To view the contents of 
  71. your old file, enter: 
  72.  
  73. C:\>TYPE CONFIG.OLD
  74.  
  75. All the lines in the file will be displayed on the screen.
  76.  
  77. To create a new CONFIG.SYS file with the changes prescribed by our Technical 
  78. Support specialist, use the DOS COPY CON command, as in this example: 
  79.  
  80. C:\>COPY CON CONFIG.SYS 
  81.  
  82. The cursor will move to the next line indicating that it is ready for you to 
  83. create the first line of text in the new CONFIG.SYS file.  Following the 
  84. advice of the support specialist, various items can be created on this and 
  85. successive lines.  Accurately type the information for each line and hit 
  86. Enter.  When all the proper lines have been typed, hit Enter once more to move 
  87. the cursor to the line below your new file. Note that the backspace key can be 
  88. used to correct a typing mistake, but you cannot go back to a line once you've 
  89. pressed Enter.  At his point type ^Z, or your function-6 key (F6) and then 
  90. Enter.  You should see: 
  91.  
  92. ^Z
  93. "1 File(s) copied" 
  94.  
  95. This confirms your file has been saved to disk.  You should use the DOS TYPE 
  96. command to be sure:
  97.  
  98. C:\>TYPE CONFIG.SYS
  99.  
  100. Q.How is EDLIN used?
  101.      Another way to edit your files is to use EDLIN. The EDLIN program is used 
  102. from the command line, or DOS prompt.  The proper syntax is: EDLIN 
  103. [drive:][path]filename. Note that the drive and path are optional. The 
  104. filename parameter specifies which text file you want to edit, if the file 
  105. does not already exist EDLIN will create it. You reference text by its line 
  106. number, which EDLIN displays for convenience.  Each line can be a maximum of 
  107. 253 characters, and you may have from 1 to 65,534 lines in a file. Once the 
  108. file is created or loaded, EDLIN displays its asterisk prompt (*) and you can 
  109. begin to enter commands.
  110.  
  111.      EDLIN commands are single characters which may be either upper or lower 
  112. case, and are preceded by one or more line numbers.  The EDLIN commands you 
  113. will use to modify your CONFIG.SYS or AUTOEXEC.BAT files are:
  114.  
  115.      COMMAND:       MEANING:
  116.      --------       --------
  117.      linenumber     selects a line of text for editing
  118.      D              deletes one or more lines
  119.      E              end; saves the file to disk and exits EDLIN
  120.      I              inserts new lines
  121.      L              lists or displays one or more lines     
  122.      Q              quit; ends session without saving file  
  123.      F3             copies all characters of the old line to the 
  124.                     new line 
  125.  
  126.      For example, if you must edit your CONFIG.SYS file you should first make 
  127. a backup using the DOS REN command:
  128.  
  129. C:\>REN CONFIG.SYS CONFIG.OLD
  130.  
  131. Now you can begin to use EDLIN to create a new CONFIG.SYS:
  132.  
  133.      C:\>EDLIN CONFIG.SYS
  134.  
  135. Edlin will then display:      C:\>EDLIN CONFIG.SYS
  136.                               End of input file
  137.                               *
  138.  
  139. At EDLIN's asterisk prompt, you should list the contents of your CONFIG.SYS 
  140. file so that the line numbers (followed by colons, ":") are displayed.  Use 
  141. the "L" command, as follows:
  142.  
  143. C:\>EDLIN CONFIG.SYS
  144.      End of input file
  145.      *L
  146.         1: DEVICE=C:\QEMM\QEMM386.SYS RAM
  147.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  148.         3: files=20
  149.         4: buffers=1
  150.         5: stacks=0,0
  151.      *
  152.  
  153. To edit a line you must type the linenumber and hit Enter at the asterisk 
  154. prompt. Let's say your technician has recommended that you add the exclusion 
  155. parameter, X=F000-F7FF, to your QEMM line.  You only need to type "1" and 
  156. press Enter to edit line 1.  Simply type in the new line at the asterisk below 
  157. the original text.  When a simple parameter has been recommended by your 
  158. technician's prescription, EDLIN's F3 key is a very convenient way to display 
  159. the entire contents of the original line.  F3 is also a good way to prevent 
  160. typographical errors.  Then, all you need to do is backspace to the correct 
  161. spot and type in your recommended parameter:
  162.  
  163. C:\>EDLIN CONFIG.SYS
  164. End of input file
  165. *L
  166.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  167.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  168.         3: files=20
  169.         4: buffers=1
  170.         5: stacks=0,0
  171. *1
  172.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  173.      1: (pressing F3 at this point displays the entire line 
  174.                above for your convenience)
  175.         1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
  176. *
  177.  
  178. Finally you must type "E" to save your new file to disk and exit EDLIN.  Here 
  179. is how this looks on the screen:
  180.  
  181. C:\>EDLIN CONFIG.SYS
  182. End of input file
  183. *L
  184.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  185.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  186.         3: files=20
  187.         4: buffers=1
  188.         5: stacks=0,0
  189. *1
  190.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  191.         1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
  192. *E
  193.  
  194. C:\>
  195. Use the DOS TYPE command to view the changes you have made:
  196.  
  197. C:\>TYPE CONFIG.SYS 
  198.  
  199. Q.What have we accomplished?
  200.  
  201.      Three different methods for editing your system's "boot-up" files have 
  202. been described. You should take your choice of the method that makes it 
  203. easiest for you to follow the advice given by our technician.  For more 
  204. detailed information on the subject of editing DOS text files, consult:
  205.  
  206.      a)  the company that sold you your copy of DOS
  207.      b)  your Word Processor's documentation regarding ASCII 
  208.           or DOS text files
  209.      c)  your DOS User Manual's section on the EDLIN utility, 
  210.           (which is often Chapter 8 or 10)
  211.      d)  The MS DOS Encyclopedia, by Microsoft Press, page 829   
  212.      e)  DOS Power Tools, by PC Magazine, page 233
  213.      f)  The New DOS 4.0, by Christopher, Feigenbaum, Saliga, 
  214.           John Wiley & Sons, page 75
  215.      g)  MS-DOS Bible, the Waite Group, H.W. Sams & Co, page 95.
  216.      h)  DOS The Complete Reference, K. Jamsa, Osborne/McGraw-
  217.           Hill, pages 403-452.
  218.  
  219.      When you edit your CONFIG.SYS or AUTOEXEC.BAT files don't forget that you 
  220. must reboot your computer to have the changes you made take effect.  While it 
  221. is not the responsibility of Quarterdeck to serve as your DOS tutor, 
  222. consultant, or to support DOS's commands (since DOS is not a Quarterdeck 
  223. product),  this technical bulletin is provided with the best interest of 
  224. trying to get you started with useful DOS features.  Since you have now 
  225. learned about your CONFIG.SYS and AUTOEXEC.BAT files and how they are 
  226. modified, we are sure you are on your way to becoming more proficient in the 
  227. use of your computer.
  228.  
  229.  
  230.   ************************************************************************
  231.   *This technical note may be copied and distributed freely as long as it*
  232.   *is distributed in its entirety and it is not distributed for profit.  *
  233.   *          Copyright (C) 1991 by Quarterdeck Office Systems            *
  234.   ************************ E N D   O F   F I L E *************************
  235.